﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace StoreWeb.system.basis
{
    public partial class productconnection : System.Web.UI.Page
    {
        Maticsoft.BLL.productsconnection pcbll = new Maticsoft.BLL.productsconnection();
        Maticsoft.BLL.InventoryClass bll = new Maticsoft.BLL.InventoryClass();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int totalOrders = bll.GetRecordCount("(cInvCCode like '05%') and bInvCEnd=1");
                AspNetPager1.RecordCount = totalOrders;
            }
        }
        void bindData()
        {
            Repeater1.DataSource = bll.GetListByPage("(cInvCCode like '05%') and bInvCEnd=1", "cInvCCode", AspNetPager1.StartRecordIndex, AspNetPager1.EndRecordIndex);
            Repeater1.DataBind();
        }
        protected string istaozhuang(string cInvCCode)
        {
            List<Maticsoft.Model.productsconnection> lists = pcbll.GetModelList("cInvCCode='" + cInvCCode + "'");
            return lists != null && lists.Count > 0 ? "是" : "否";
        }
        protected void AspNetPager1_PageChanged(object src, EventArgs e)
        {
            bindData();
        }
    }
}